import { Pipe, PipeTransform } from '@angular/core';
import { TaskType } from '../services/task.service';

@Pipe({
  name: 'taskReplyUnit'
})
export class TaskReplyUnitPipe implements PipeTransform {

  transform(value: any, args?: any): any {
    switch (value) {
      case TaskType.All:
      case TaskType.SystemUpgrade:
      case TaskType.SoftwareUpgrade:
      case TaskType.Policy:
      case TaskType.Script:
      case TaskType.UsbAuth:
        return "终端";
      case TaskType.DetelePc:
        return "终端";
      case TaskType.Client:
        return "终端";
      case TaskType.Message:
        return "人";
    }
    return value;
  }

}
